﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;

namespace MySpiderMgr.Data
{
    public interface IRepository<T> where T : class
    {
        /// <summary>
        /// 根据Id查找
        /// </summary>
        /// <typeparam name="V"></typeparam>
        /// <param name="Id"></param>
        /// <returns></returns>
        T GetById<V>(V Id);
        /// <summary>
        /// 增加
        /// </summary>
        /// <param name="Entity"></param>
        void Add(T Entity);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="Entity"></param>
        void Update(T Entity);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Entity"></param>
        void Delete(T Entity);
    }
}
